package org.jrfe.util;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.ShortBuffer;

import org.lwjgl.BufferUtils;

public class BufferUtil {

	public static FloatBuffer copyBuffer(int size,FloatBuffer srcBuffer){
		FloatBuffer fb = BufferUtils.createFloatBuffer(size);
		fb.put(srcBuffer);
		fb.flip();
		return fb;
	}
	
	public static ShortBuffer copyBuffer(int size,ShortBuffer srcBuffer){
		ShortBuffer fb = BufferUtils.createShortBuffer(size);
		fb.put(srcBuffer);
		fb.flip();
		return fb;
	}
}
